<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    let money = 0
    while(true){
      let cz = prompt(`
           请输入你的操作
           1:存钱
           2:取钱
           3:查看余额
           4:退出
      `)
      switch(cz){
        case '1':
          let cun = prompt('请输入要存的金额')
          money += +cun
          break
        case '2':
          let qu = prompt('请输入要取的金额')
          money -= qu
          break
        case '3':
          alert(`您的余额是${money}`)
          break
        default:
          break
      }
      if (cz === '4'){
        alert('退出成功')
        break
      }
    }
  </script>
</body>
</html>